package cn.wuyi.item.consumer.resttemplate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import cn.wuyi.item.consumer.feign.AdminClient;
import cn.wuyi.item.consumer.service.AdminService;

@RestController
public class TestController {
    @Autowired
    private AdminService adminService;
   
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    public String sayHi(@RequestParam String message) {
        return adminService.sayHi(message);
    }
    
    @Autowired
    private AdminClient adminClient;
    @RequestMapping(value = "hello", method = RequestMethod.GET)
    public String sayHi2(@RequestParam String message) {
        return adminClient.sayHi(message);
    }
}